]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Animate launch of new-window action in the AppIconMenu
authorJonas Dreßler <verdre@v0yd.nl>
Fri, 2 Aug 2019 12:23:13 +0000 (14:23 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Thu, 8 Aug 2019 15:28:48 +0000 (15:28 +0000)
We add our own "New Window" menu entry if the app doesn't already
provide a 'new-window' action. For this menu entry, we show the zoom out
animation on the app icon when the user clicks the entry.

To be consistent in case the app already provides its own 'new-window'
action via its AppInfo, also show the zoom out animation when this
action is activated.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/662

js/ui/appDisplay.js

index f6bab8bbb4bf8afc7c4ad8e96cbc0b60e85d1c2d..fc6c1290ea6753c2a48e8f74f5aff541c426a605 100644 (file)
@@ -2060,6 +2060,10 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
                 let action = actions[i];
                 let item = this._appendMenuItem(appInfo.get_action_name(action));
                 item.connect('activate', (emitter, event) => {
+                    if (action == 'new-window' &&
+                        this._source.app.state == Shell.AppState.STOPPED)
+                        this._source.animateLaunch();
+
                     this._source.app.launch_action(action, event.get_time(), -1);
                     this.emit('activate-window', null);
                 });